package com.hertz.appr.pojo.db;



/**
 * Task entity. @author MyEclipse Persistence Tools
 */

public class Task  implements java.io.Serializable {


    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = -1200283587712574112L;
	private Long id;
	private String toUid;
	private String toNick;
	private String sourceTid;
	private String provider;
	private String msg;
	private String img;
	private Long actionId;
	private Short type;
	private Short status;
	private Long createTime;
	private Long systemTime;

	// 任务状态：1-等待，2-执行中，3-完成，4-异常
	public static final Short TASK_STATUS_WAIT = 1;
	public static final Short TASK_STATUS_ING = 2;
	public static final Short TASK_STATUS_END = 3;
	public static final Short TASK_STATUS_ERROR = 4;
	// 1-回复激活结果，返回action id,2-向发起人发送私信，通告活动结果,3-view，向询问人返回结果。
	public static final Short TASK_TYPE_SEND_ID = 1;
	public static final Short TASK_TYPE_SEND_RESULT = 2;
	public static final Short TASK_TYPE_VIEW = 3;
	public static final Short TASK_TYPE_WARNING = 4;
	public static final Short TASK_TYPE_NOTICE = 5;
	public static final Short TASK_TYPE_PUBLICACTION = 6;

    // Constructors

    /** default constructor */
    public Task() {
    }

	/** minimal constructor */
    public Task(Long id, String provider, String msg, Short type, Short status, Long createTime, Long systemTime) {
        this.id = id;
        this.provider = provider;
        this.msg = msg;
        this.type = type;
        this.status = status;
        this.createTime = createTime;
        this.systemTime = systemTime;
    }
    
    /** full constructor */
    public Task(Long id, String toUid, String toNick, String provider, String msg, Long actionId, Short type, Short status, Long createTime, Long systemTime) {
        this.id = id;
        this.toUid = toUid;
        this.toNick = toNick;
        this.provider = provider;
        this.msg = msg;
        this.actionId = actionId;
        this.type = type;
        this.status = status;
        this.createTime = createTime;
        this.systemTime = systemTime;
    }

   
    // Property accessors

    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }

    public String getToUid() {
        return this.toUid;
    }
    
    public void setToUid(String toUid) {
        this.toUid = toUid;
    }

    public String getToNick() {
        return this.toNick;
    }
    
    public void setToNick(String toNick) {
        this.toNick = toNick;
    }

    public String getProvider() {
        return this.provider;
    }
    
    public void setProvider(String provider) {
        this.provider = provider;
    }

    public String getMsg() {
        return this.msg;
    }
    
    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Long getActionId() {
        return this.actionId;
    }
    
    public void setActionId(Long actionId) {
        this.actionId = actionId;
    }

    public Short getType() {
        return this.type;
    }
    
    public void setType(Short type) {
        this.type = type;
    }

    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }

    public Long getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getSystemTime() {
        return this.systemTime;
    }
    
    public void setSystemTime(Long systemTime) {
        this.systemTime = systemTime;
    }
    public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	public String getSourceTid() {
		return sourceTid;
	}

	public void setSourceTid(String sourceTid) {
		this.sourceTid = sourceTid;
	}

	@Override
	public String toString(){
		return "Task{" +
		" provider=" + String.format("%1$4S", provider) +
		", aid=" + String.format("%1$-15S", actionId) +
        ", type=" + String.format("%1$-2S", type) +
        ", status=" + String.format("%1$-2S", this.status) +
        ", systemTime='" + this.systemTime + '\'' +
        '}';
	}







}